#ifndef EMAIL_MAILHEAD_H
#define EMAIL_MAILHEAD_H

#include <QString>
#include <QStringList>

namespace email{

	enum WeekType{Mon, Tue, Wed, Thu, Fri, Sat, Sun};
	enum MonthType{Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec};

	class MailField
	{
	private:
		QString Name;
	public:
		MailField();
		virtual QString getName() = 0;
		virtual bool parse(QString email) = 0;
		virtual QString toString() = 0;
		virtual ~MailField();
	};

	class Date : public MailField
	{
	private:
		WeekType Week;
		unsigned int Day;
		MonthType Month;
		unsigned int Year;
		unsigned int Hour;
		unsigned int Minute;
		unsigned int Second;
		unsigned int TimeDifference;
		QString Zone;
		QString ZoneName;
	public:
		Date() : Name("Date");
		QString getName();
		bool setWeek(QString week);
		bool setDay(unsigned int day);
		bool setMonth(QString Month);
		bool setYear(unsigned int year);
		bool setHour(unsigned int hour);
		bool setMinute(unsigned int minute);
		bool setSecond(unsigned int second);
		bool setZone(QString zone);
		bool setZoneName(QString zonename);
		WeekType getWeek();
		unsigned int getDay();
		MonthType getMonth();
		unsigned int getYear();
		unsigned int getHour();
		unsigned int getMinute();
		unsigned int getSecond();
		unsigned int getTimeDifference();
		QString getZone();
		QString getZoneName();
		bool parse(QString date);
		QString toString();
		~Date();
	};

	class Received : public MailField
	{
	private:
		QString FirstDomain;
		QString SecondDomain;
		QString IPAddress;
		Date ReceivedDate;
	public:
		bool setFirstDomain

	};
}
#endif